# $Id: PKGBUILD 75512 2012-08-26 18:24:09Z bpiotrowski $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Henrik Nymann Jensen <h@henriknj.dk>

pkgname=pdnsd
pkgver=1.2.9.a
_pkgver=${pkgver/.a/a}
pkgrel=1
pkgdesc="Proxy DNS server with permanent caching"
arch=(i686 x86_64)
url="http://members.home.nl/p.a.rombouts/pdnsd/"
license=('GPL')
depends=('glibc')
source=(http://members.home.nl/p.a.rombouts/pdnsd/releases/pdnsd-$_pkgver-par.tar.gz
		rc.d
		service)
md5sums=('2f3e705d59a0f9308ad9504b24400769'
         '3670bd47c9303fbb655d9216715512de'
         'fad5e518d126b29fc947941d57a0a494')

build() {
	cd $srcdir/$pkgname-$_pkgver
	./configure --prefix=/usr --sysconfdir=/etc
	make
}

package() {
	cd $srcdir/$pkgname-$_pkgver
	make DESTDIR=$pkgdir install

	install -Dm0755 $srcdir/rc.d $pkgdir/etc/rc.d/pdnsd
	install -Dm0644 $srcdir/service $pkgdir/usr/lib/systemd/system/pdnsd.service
}
